3.162 \(\int \cot ^4(a+b x) \, dx\)

Optimal. Leaf size=27 \[ -\frac{\cot ^3(a+b x)}{3 b}+\frac{\cot (a+b x)}{b}+x \]

[Out]

x + Cot[a + b*x]/b - Cot[a + b*x]^3/(3*b)

________________________________________________________________________________________

Rubi [A]  time = 0.0165922, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3473, 8} \[ -\frac{\cot ^3(a+b x)}{3 b}+\frac{\cot (a+b x)}{b}+x \]

Antiderivative was successfully verified.

[In]

Int[Cot[a + b*x]^4,x]

[Out]

x + Cot[a + b*x]/b - Cot[a + b*x]^3/(3*b)

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \cot ^4(a+b x) \, dx &=-\frac{\cot ^3(a+b x)}{3 b}-\int \cot ^2(a+b x) \, dx\\ &=\frac{\cot (a+b x)}{b}-\frac{\cot ^3(a+b x)}{3 b}+\int 1 \, dx\\ &=x+\frac{\cot (a+b x)}{b}-\frac{\cot ^3(a+b x)}{3 b}\\ \end{align*}

Mathematica [C]  time = 0.0091097, size = 33, normalized size = 1.22 \[ -\frac{\cot ^3(a+b x) \, _2F_1\left (-\frac{3}{2},1;-\frac{1}{2};-\tan ^2(a+b x)\right )}{3 b} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[a + b*x]^4,x]

[Out]

-(Cot[a + b*x]^3*Hypergeometric2F1[-3/2, 1, -1/2, -Tan[a + b*x]^2])/(3*b)

________________________________________________________________________________________

Maple [A]  time = 0.014, size = 26, normalized size = 1. \begin{align*}{\frac{1}{b} \left ( -{\frac{ \left ( \cot \left ( bx+a \right ) \right ) ^{3}}{3}}+\cot \left ( bx+a \right ) +bx+a \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^4/sin(b*x+a)^4,x)

[Out]

1/b*(-1/3*cot(b*x+a)^3+cot(b*x+a)+b*x+a)

________________________________________________________________________________________

Maxima [A]  time = 1.48012, size = 46, normalized size = 1.7 \begin{align*} \frac{3 \, b x + 3 \, a + \frac{3 \, \tan \left (b x + a\right )^{2} - 1}{\tan \left (b x + a\right )^{3}}}{3 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4/sin(b*x+a)^4,x, algorithm="maxima")

[Out]

1/3*(3*b*x + 3*a + (3*tan(b*x + a)^2 - 1)/tan(b*x + a)^3)/b

________________________________________________________________________________________

Fricas [B]  time = 2.08996, size = 166, normalized size = 6.15 \begin{align*} \frac{4 \, \cos \left (b x + a\right )^{3} + 3 \,{\left (b x \cos \left (b x + a\right )^{2} - b x\right )} \sin \left (b x + a\right ) - 3 \, \cos \left (b x + a\right )}{3 \,{\left (b \cos \left (b x + a\right )^{2} - b\right )} \sin \left (b x + a\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4/sin(b*x+a)^4,x, algorithm="fricas")

[Out]

1/3*(4*cos(b*x + a)^3 + 3*(b*x*cos(b*x + a)^2 - b*x)*sin(b*x + a) - 3*cos(b*x + a))/((b*cos(b*x + a)^2 - b)*si
n(b*x + a))

________________________________________________________________________________________

Sympy [A]  time = 1.67347, size = 48, normalized size = 1.78 \begin{align*} \begin{cases} x + \frac{\cos{\left (a + b x \right )}}{b \sin{\left (a + b x \right )}} - \frac{\cos ^{3}{\left (a + b x \right )}}{3 b \sin ^{3}{\left (a + b x \right )}} & \text{for}\: b \neq 0 \\\frac{x \cos ^{4}{\left (a \right )}}{\sin ^{4}{\left (a \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**4/sin(b*x+a)**4,x)

[Out]

Piecewise((x + cos(a + b*x)/(b*sin(a + b*x)) - cos(a + b*x)**3/(3*b*sin(a + b*x)**3), Ne(b, 0)), (x*cos(a)**4/
sin(a)**4, True))

________________________________________________________________________________________

Giac [B]  time = 1.16704, size = 84, normalized size = 3.11 \begin{align*} \frac{\tan \left (\frac{1}{2} \, b x + \frac{1}{2} \, a\right )^{3} + 24 \, b x + 24 \, a + \frac{15 \, \tan \left (\frac{1}{2} \, b x + \frac{1}{2} \, a\right )^{2} - 1}{\tan \left (\frac{1}{2} \, b x + \frac{1}{2} \, a\right )^{3}} - 15 \, \tan \left (\frac{1}{2} \, b x + \frac{1}{2} \, a\right )}{24 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^4/sin(b*x+a)^4,x, algorithm="giac")

[Out]

1/24*(tan(1/2*b*x + 1/2*a)^3 + 24*b*x + 24*a + (15*tan(1/2*b*x + 1/2*a)^2 - 1)/tan(1/2*b*x + 1/2*a)^3 - 15*tan
(1/2*b*x + 1/2*a))/b